<script type="text/javascript">
$(function(){
	var pg = App.message.brokerQueue.ui, pp = pg.params || {},
		gd = pg.children('.grid');

	gd.mac('grid', {
		cols: [{
			field: 'catalog', title : '所属系统', width: 100
		}, {
			field: 'code', title : '编号', width: 100
		}, {
			field: 'name', title : '名称 ', width: 140
		}, {
			field: 'roller', title : 'roller ', width: 430,
			render: function(r, tr, me){
				return $('<span class="a"></span>').click(function(){
							App.show({
								ctx: 'message',
								action: 'brokerDetails',
								params: { broke: pp, queue: r,type:1 }
							}, $.noop, pg.parent());
				}).append(r.roller);
			}
		}, {
			field: 'type', title : '类型 ', width: 45,
			render: function(r) {
				return Cache.message.queue.type[r.type];
			}
		},{
			field: 'status', title : '状态', width: 80,
			render: function(r) {
				return Cache.message.queue.status[r.status];
			}
		}],
		loader: {
			url: App.ctx + '/broker/queue.do',
			params: {
				pageNo: 1, pageSize: 20,addr:pp
			},
			autoLoad: true
		},
	});

	function showQueue(o){
		App.show({
			ctx: 'message',
			action: 'brokerQueue',
			params: o
		}, $.noop, infoPl);
	}

	function adjust(){
		pg.height(pg.parent().height() - 32);
		gd.adjust();
	}
	$(window).resize(adjust);
	adjust();
});
</script>
<div class="grid"></div>